import React from 'react'
import './Indexgoods.css'
export default function Indexgoods(props) {
    let {indexgoods,flag}=props
    // console.log(indexgoods)
    return (
        <div className='Indexgoods'>
            {/* <h3>-------</h3> */}
            {/* {JSON.stringify(indexgoods)} */}
            {
                indexgoods[flag]?indexgoods[flag].content.map(item=>(
                    <div className='Indexgoods_box' key={item.id}>
                        <img src={item.img} alt=""/>
                        <ul>
                        <li>现价：{item.price}</li>
                        <li>原价：{item.market_price}</li>
                        <li>{item.goodsname}</li>
                        </ul>
                    </div>
                )):null
            }
        </div>
    )
}